package keeto.com.vn.classified.network;

import java.io.IOException;

import keeto.com.vn.classified.config.IConfig;
import keeto.com.vn.classified.request.AckLogonCompleteRequest;
import keeto.com.vn.classified.request.ChangeAvatarRequest;
import keeto.com.vn.classified.request.ChangePassRequest;
import keeto.com.vn.classified.request.CommentRequest;
import keeto.com.vn.classified.request.CommentRequestProduct;
import keeto.com.vn.classified.request.ForgetPassRequest;
import keeto.com.vn.classified.request.GetAndroidInterestShopRequest;
import keeto.com.vn.classified.request.GetAndroidProductProposedRequest;
import keeto.com.vn.classified.request.GetAndroidProductTypeRequest;
import keeto.com.vn.classified.request.GetMyHandBookRequest;
import keeto.com.vn.classified.request.GetProductAdRequest;
import keeto.com.vn.classified.request.GetProductCateFourRequest;
import keeto.com.vn.classified.request.GetProfileInfoRequest;
import keeto.com.vn.classified.request.GetSearchGlobalProductRequest;
import keeto.com.vn.classified.request.LogoutRequest;
import keeto.com.vn.classified.request.ProductBySellerRequest;
import keeto.com.vn.classified.request.PublishRequest;
import keeto.com.vn.classified.request.RegisterRequest;
import keeto.com.vn.classified.request.SendAndroidInterestShopRequest;
import keeto.com.vn.classified.request.SendAndroidProductAbuselRequest;
import keeto.com.vn.classified.request.UpdateUserInfoRequest;
import keeto.com.vn.classified.request.UploadPictureRequest;
import keeto.com.vn.classified.request.ValidateUserRequest;
import keeto.com.vn.classified.response.AckLogonCompleteResponse;
import keeto.com.vn.classified.response.ChangeAvatarResponse;
import keeto.com.vn.classified.response.ChangePassResponse;
import keeto.com.vn.classified.response.CommentResponse;
import keeto.com.vn.classified.response.CommentResponseProduct;
import keeto.com.vn.classified.response.ForgotPassResponse;
import keeto.com.vn.classified.response.GetAndroidInterestShopResponse;
import keeto.com.vn.classified.response.GetAndroidProductResponse;
import keeto.com.vn.classified.response.GetAndroidProductTypeResponse;
import keeto.com.vn.classified.response.GetMyHandBookResponse;
import keeto.com.vn.classified.response.GetProductAdResponse;
import keeto.com.vn.classified.response.GetProductCateFourResponse;
import keeto.com.vn.classified.response.GetProfileInfoResponse;
import keeto.com.vn.classified.response.LogoutResponse;
import keeto.com.vn.classified.response.ProductBySellerRespone;
import keeto.com.vn.classified.response.PublishResponse;
import keeto.com.vn.classified.response.RegisterResponse;
import keeto.com.vn.classified.response.SearchResponse;
import keeto.com.vn.classified.response.SendAndroidInterestShopResponse;
import keeto.com.vn.classified.response.SendAndroidProductAbuselResponse;
import keeto.com.vn.classified.response.UpdateUserInfoResponse;
import keeto.com.vn.classified.response.UploadPictureResponse;
import keeto.com.vn.classified.response.ValidateUserResponse;
import keeto.com.vn.classified.ui.MainApplication;

import org.apache.http.client.ClientProtocolException;
import org.json.JSONException;

public interface IProtocol {
	public final String SYNC_URL = IConfig.IM_URL;
	public final String UDP_POLLING_URL = IConfig.UDP_POLLING_URL;
	public final String URL = IConfig.IA_NEW_URL;
	public final String authenKeyAPI = MainApplication.getAuthenKey();

	public final int STATUS_CODE_OK_200 = 200;
	public final int STATUS_CODE_AUTHENTICATION_FAIL_403 = 403;
	public final int STATUS_CODE_ROSTER_NOT_AUTHORIZED_TO_CHECK_STATUS_404 = 404;
	public final int STATUS_CODE_SESSIOON_TIMEOUT_408 = 408;
	public final int STATUS_CODE_SESSION_DUPLICATE_409 = 409;
	public final int STATUS_CODE_VERSION_OUT_OF_DATE = 410;
	public final int STATUS_CODE_SNS_POST_HAS_BEEN_DELETED_418 = 418;
	public final int STATUS_CODE_BUDDY_HAS_BEEN_DELETED_419 = 419;
	public final int STATUS_CODE_ROSTER_ALREADY_EXIST_420 = 420;
	public final int STATUS_CODE_ROSTER_NOT_EXIST_424 = 424;
	public final int STATUS_CODE_GENERICFAIL_500 = 500;
	public final int STATUS_CODE_NETWORKFAIL_501 = 501;
	public final int STATUS_CODE_CONNECTION_TIMEOUT_502 = 502;
	public final int STATUS_CODE_SOCKECT_EXCEPTION_504 = 504;
	public final int STATUS_CODE_UNSUPPORTED_ENCODING_EXCEPTION_505 = 505;
	public final int STATUS_CODE_CLIENT_PROTOCOL_EXCEPTION_506 = 506;
	public final int STATUS_CODE_IO_EXCEPTION_507 = 507;
	public final int STATUS_CODE_REGISTER_USER_EXSIT_600 = 600;
	public final int STATUS_CODE_USER_NOT_FOUND_601 = 601;
	public final int STATUS_CODE_OBJECT_NOT_FOUND_602 = 602;
	public final int STATUS_CODE_LIKE_EXIST_603 = 603;
	public final int STATUS_CODE_CANT_ADD_SELF_611 = 611;
	public final int STATUS_CODE_ACCOUNT_NOT_EXIST_616 = 616;
	// TODO add 616 as return code of username not existed.
	public final int STATUS_CODE_ACCOUNT_NOT_EXSITED = 616;
	public final int STATUS_CODE_ACCOUNT_ALREADY_EXIST_672 = 672;
	public final int STATUS_CODE_SMS_AUTH_FAILED_703 = 703;
	public final int STATUS_CODE_SMS_AUTH_TIME_OUT_708 = 708;
	public final int STATUS_CODE_SUBSCRIPTION_EXPIRY_706 = 706;
	public final int STATUS_CODE_SERVICE_SUSPENDED_707 = 707;

	public final String METHOD_LOGON = "logon";
	public final String METHOD_REG = "register";
	public final String METHOD_FORGOT_PASS = "UserLostPassword";
	public final String METHOD_GET_INFO_USER = "getAndroidUserInfo";
	public final String METHOD_LOG_OUT = "logout";
	public final String METHOD_CHANGE_PASS = "UserChangePassword";
	public final String METHOD_UPDATE_USER_INFO = "updateAndroidUserInfo";
	public final String METHOD_UPDATE_VIEW_PRODUCT = "updateViewProduct";


	public final String METHOD_GetAndroidProduct = "getAndroidProduct";
	public final String METHOD_GetAndroidInterestShop = "getAndroidInterest";
	public final String METHOD_SendAndroidInterestShop = "sendAndroidInterest";
	public final String METHOD_Comment = "sendAndroidComment";
	public final String METHOD_SendAndroidProductAbusel = "sendAndroidProductAbusel";
	public final String METHOD_uploadPicture = "uploadPicture";
	public final String METHOD_Publish = "publish";
	public final String METHOD_GetFavorites = "getAndroidListInterest";
	public final String METHOD_GetMyPosted = "getUserItems";
	public final String METHOD_GetHistory = "getAndroidProduct";
	public final String METHOD_Search = "searchAndroidProduct";





	public GetProductAdResponse getAndroidProductAd(GetProductAdRequest request)
			throws JSONException, ClientProtocolException, IOException;
	public ValidateUserResponse getLogin(ValidateUserRequest request);
	public AckLogonCompleteResponse ackLogonComplete(
			AckLogonCompleteRequest request) ;
	public RegisterResponse register(RegisterRequest request) throws JSONException;

	public GetAndroidProductResponse getAndroidProductProposed(
			GetAndroidProductProposedRequest request) throws JSONException, ClientProtocolException, IOException;

	public GetProductCateFourResponse getProductSubCate(
			GetProductCateFourRequest request)throws JSONException, ClientProtocolException, IOException;
	public ForgotPassResponse forgotPass(ForgetPassRequest request) throws JSONException;
	public GetProfileInfoResponse getProfileInfo(GetProfileInfoRequest request) throws JSONException;
	public GetAndroidProductTypeResponse getAndroidProductType(
			GetAndroidProductTypeRequest request)throws JSONException, ClientProtocolException, IOException;
	public GetAndroidProductTypeResponse getAndroidProductSameCost(
			GetAndroidProductTypeRequest request)throws JSONException, ClientProtocolException, IOException;
	public ProductBySellerRespone getProductbySeller(
			ProductBySellerRequest request)throws JSONException, ClientProtocolException, IOException;
	public CommentResponseProduct getCommentProduct(
			CommentRequestProduct request)throws JSONException, ClientProtocolException, IOException;
	public GetAndroidInterestShopResponse getAndroidInterestShop(
			GetAndroidInterestShopRequest request)throws JSONException, ClientProtocolException, IOException;
	public SendAndroidInterestShopResponse sendAndroidInterestShop(
			SendAndroidInterestShopRequest request)throws JSONException, ClientProtocolException, IOException;
	public CommentResponse comment(CommentRequest request)throws JSONException, ClientProtocolException, IOException;
	public SendAndroidProductAbuselResponse sendAndroidProductAbusel(
			SendAndroidProductAbuselRequest request)throws JSONException, ClientProtocolException, IOException;
	public LogoutResponse finishLogout(LogoutRequest request) throws JSONException,ClientProtocolException, IOException;
	public UploadPictureResponse uploadPicture(UploadPictureRequest request,String content) throws JSONException, ClientProtocolException,IOException;
	public PublishResponse publish(PublishRequest request)throws JSONException, ClientProtocolException, IOException;
	public GetMyHandBookResponse getMyHandBook(GetMyHandBookRequest request)throws JSONException,ClientProtocolException, IOException;
	public ChangePassResponse finishChangePass(ChangePassRequest request) throws JSONException,ClientProtocolException, IOException;
	public UpdateUserInfoResponse finishUpdateUserInfo(UpdateUserInfoRequest request)throws JSONException,ClientProtocolException, IOException;
	public String finishUpdateView(String request)throws JSONException,ClientProtocolException, IOException;
	public SearchResponse getGlobalSearch(GetSearchGlobalProductRequest request) throws JSONException, ClientProtocolException, IOException;
	public ChangeAvatarResponse ChangeAvatar(ChangeAvatarRequest request) throws JSONException, ClientProtocolException, IOException;
	
}
